package com.g13.virtualpethospital.service;

import com.g13.virtualpethospital.entity.QuestionEntity;
import com.g13.virtualpethospital.exceptions.QuestionException;

import java.util.List;

/**
 * @Title: QuestionService
 * @Author yyj1205
 * @Package com.g13.virtualpethospital.service
 * @Date 24/3/2024 20:45
 * @description: 问题相关的服务
 */
public interface QuestionService {
    /**
     * 添加问题
     * @param question
     */
    public void addQuestion(QuestionEntity question);

    /**
     * 更新一个问题
     * @param question
     * @param id
     */
    public void updateQuestion(QuestionEntity question, String id) throws QuestionException;

    /**
     * 删除特定id的问题
     * @param id
     */
    public void deleteQuestion(String id) throws QuestionException;

    /**
     * 按类别查找问题，留空代表不做筛选
     * @param menu
     * @param subMenu
     * @return
     */
    public List<QuestionEntity> findQuestionByType(String menu, String subMenu);

    /**
     * 按关键字查找问题,留空代表不做筛选
     * @param name
     * @return
     */
    public List<QuestionEntity> findQuestionByName(String name);

    /**
     * 查找所有问题
     * @return
     */
    public List<QuestionEntity> findAllQuestion();



    /**
     * 根据Id查找答案
     * @param questionId
     * @return
     */


    String findCorrectOptionByQuestionId(String questionId) throws QuestionException;

    List<String> findQuestionIdsByPaperId(String paperId) throws QuestionException;

    QuestionEntity findQuestionById(String questionId);
}
